<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">  
//需要判断浏览器支不支持，可以去w3c进行查看

var source = new EventSource('sse/get_data');
source.onmessage = function (event) {
  console.info(event.data);
  document.getElementById('result').innerText = event.data
};

</script>  
</head>

<body>
模拟股票行情
 <div>xdclass test</div>  
    <div id="result"></div>  
</body>


</html>
